package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.RecordPictureCarMapper;
import com.ruoyi.business.domain.RecordPictureCar;
import com.ruoyi.business.service.IRecordPictureCarService;

/**
 * 车辆通行记录Service业务层处理
 * 
 * @author asher
 * @date 2022-05-25
 */
@Service
public class RecordPictureCarServiceImpl implements IRecordPictureCarService 
{
    @Autowired
    private RecordPictureCarMapper recordPictureCarMapper;

    /**
     * 查询车辆通行记录
     * 
     * @param recordPictureCarId 车辆通行记录主键
     * @return 车辆通行记录
     */
    @Override
    public RecordPictureCar selectRecordPictureCarByRecordPictureCarId(Long recordPictureCarId)
    {
        return recordPictureCarMapper.selectRecordPictureCarByRecordPictureCarId(recordPictureCarId);
    }

    /**
     * 查询车辆通行记录列表
     * 
     * @param recordPictureCar 车辆通行记录
     * @return 车辆通行记录
     */
    @Override
    public List<RecordPictureCar> selectRecordPictureCarList(RecordPictureCar recordPictureCar)
    {
        return recordPictureCarMapper.selectRecordPictureCarList(recordPictureCar);
    }

    /**
     * 新增车辆通行记录
     * 
     * @param recordPictureCar 车辆通行记录
     * @return 结果
     */
    @Override
    public int insertRecordPictureCar(RecordPictureCar recordPictureCar)
    {
        recordPictureCar.setCreateTime(DateUtils.getNowDate());
        return recordPictureCarMapper.insertRecordPictureCar(recordPictureCar);
    }

    /**
     * 修改车辆通行记录
     * 
     * @param recordPictureCar 车辆通行记录
     * @return 结果
     */
    @Override
    public int updateRecordPictureCar(RecordPictureCar recordPictureCar)
    {
        recordPictureCar.setUpdateTime(DateUtils.getNowDate());
        return recordPictureCarMapper.updateRecordPictureCar(recordPictureCar);
    }

    /**
     * 批量删除车辆通行记录
     * 
     * @param recordPictureCarIds 需要删除的车辆通行记录主键
     * @return 结果
     */
    @Override
    public int deleteRecordPictureCarByRecordPictureCarIds(Long[] recordPictureCarIds)
    {
        return recordPictureCarMapper.deleteRecordPictureCarByRecordPictureCarIds(recordPictureCarIds);
    }

    /**
     * 删除车辆通行记录信息
     * 
     * @param recordPictureCarId 车辆通行记录主键
     * @return 结果
     */
    @Override
    public int deleteRecordPictureCarByRecordPictureCarId(Long recordPictureCarId)
    {
        return recordPictureCarMapper.deleteRecordPictureCarByRecordPictureCarId(recordPictureCarId);
    }
}
